<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">

	var map;
	var marker;
		function init_map() {
			var myOptions = {
				zoom : 6,
				center : new google.maps.LatLng(36.580247, -231.979981),
				mapTypeId : google.maps.MapTypeId.ROADMAP
			};
			map = new google.maps.Map(document.getElementById("gmap_canvas"),
					myOptions);
			
			marker = new google.maps.Marker({
				map : map,
				position : new google.maps.LatLng(36.5,
						-232),
			/* draggable:true, // Bounce

			animation: google.maps.Animation.DROP // Bounce */
			});
			infowindow = new google.maps.InfoWindow({
				content : maps.getPosition
			});
			google.maps.event.addListener(marker, "click", function() {
				
				infowindow.open(map, marker);
			});
			infowindow.open(map, marker);
		}
		google.maps.event.addDomListener(window, 'load', init_map);
		
		/* google.maps.event.addListener(marker, 'click', function() { 
			var infowindow = new google.maps.InfoWindow( 
					     { content: '안녕하세요~', 
					       size: new google.maps.Size(100,100) 
					     });
			infowindow.open(map, marker);
			}); */

</script>

<script type="text/javascript">
	function submit() {
		var x = parseInt(document.getElementById("x").value);
		var y = parseInt(document.getElementById("y").value);

		map.panTo(new google.maps.LatLng(x, y));
		marker.setPosition(new google.maps.LatLng(x, y));
		
	}
</script>

</head>
<body>
	<div style="overflow: hidden; height: 500px; width: 600px;">
		<div id="gmap_canvas" style="height: 500px; width: 600px;"></div>
		<a class="google-map-code" href="http://www.map-embed.com"
			id="get-map-data">find out here</a>
		<style>
#gmap_canvas img {
	max-width: none !important;
	background: none !important
}
</style>
		<a class="google-map-data" href="http://www.stromvergleich.bz"
			id="get-map-data">stromvergleich.bz</a>
	</div>
	

Y : <input id="x" name="x" type="text"><br>
X : <input id="y" name="y" type="text"><br>
<input id="submit" name="submit" type="button" value="확인" onclick="submit()">


</body>
</html>